/**
 * author: XGP
 * date: 2018/07/25
 * des: 人员招聘-招聘规划
 */
import request from '@/utils/request'



/**
 * 获取人才库的列表
 */
export function getRequireList(params) {
  return request({
    url: '/talentpools/findAll',
    method: 'get',
    params: params
  })
}

/**
 * 获取人才库的状态下的人数
 */
export function getresumeLibStatus() {
  return request({
    url: '/talentpools/findAll',
    method: 'get'
  })
}

/**
 * 获取人才库详情
 */
export function getDetail(id) {
  return request({
    url: '/talentpools/find/' + id,
    method: 'get'
  })
}


/**
 * 新增人才库
 */
export function addResume(data) {
  return request({
    url: '/talentpools/insert',
    method: 'post',
    data
  })
}

/**
 * 删除才库
 */
export function deleteResume(id) {
  return request({
    url: '/talentpools/delete/' + id,
    method: 'delete'

  })
}

/**
 * 删除淘汰库
 */
export function deleteEliminate(id) {
  return request({
    url: '/interviewerblacklists/delete/' + id,
    method: 'delete'

  })
}

/**
 * 编辑人才库
 */
export function updateResume(data) {
  return request({
    url: '/talentpools/update',
    method: 'put',
    data: data
  })
}


/**
 * 获取淘汰库的列表
 */
export function getEliminateList(params) {
  return request({
    url: '/interviewerblacklists/findAll',
    method: 'get',
    params: params
  })
}

/**
 * 获取淘汰库的详情
 */
export function getEliminateDetatil(id) {
  return request({
    url: '/interviewerblacklists/find/' + id,
    method: 'get'
  })
}



/**
 * 编辑淘汰库
 */
export function addEliminate(data) {
  return request({
    url: '/interviewerblacklists/update',
    method: 'put',
    data: data
  })
}
//

/**
 * 移动到候选通过
 */
export function goToInterviewer(data) {
  return request({
    url: '/talentpools/goToInterviewer',
    method: 'put',
    data: data
  })
}

/**
 * 移动到候选通过
 */
export function goToInterviewerEliminate(data) {
  return request({
    url: '/interviewerblacklists/goToInterviewer',
    method: 'put',
    data: data
  })
}



/**
 * 统计人才库count
 */
export function findResumelibCount(data) {
  return request({
    url: '/talentpools/findCount',
    method: 'get',
    params: data
  })
}


/**
 * 统计淘汰库
 */
export function findEliminateCount(data) {
  return request({
    url: '/interviewerblacklists/findCount',
    method: 'get',
    params: data
  })
}
